﻿<%@ Page Title="" Language="C#" MasterPageFile="~/backend/Admin.Master" AutoEventWireup="true"
    CodeBehind="ClassDetails.aspx.cs" Inherits="mamnontuoitho7.backend.ClassDetails" %>
<%@ Import Namespace="mamnontuoitho7.AppCode" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<!-- Begin left column window -->
<div class="twocolumn">
	<div class="column_left" style="width:45%;">
		<div class="header">
			<span>Danh Sách Giáo Viên Lớp <%= _className%></span>
            <div class="switch">
                <form action="ClassTeacherAdd.aspx" method="get" >
                  <input type="hidden" id="hidClassID" name="hidClassID" value="<%= _classID %>" />
                  <input type="hidden" id="Hidden8" name="hidClassName" value="<%= _className %>" />
                  <input type="submit" value="Thêm giáo viên vào lớp"/>
                </form>
		    </div>
		</div>

         <%
        /* Check class has teacher or not */
        if (_dttTeacher.Rows.Count > 0)
        {%>

		<br class="clear"/>
		<div class="content">
            <table width="100%">
                <tr>
                    <td>
                        <table cellpadding="0" cellspacing="0" border="0" class="tinytable">
                            <thead>
                                <tr>
                                    <!--vị trí header list-->
                                    <th>
                                        <h3>
                                            <asp:Label ID="Label1" runat="server" Text='Hình Ảnh'></asp:Label></h3>
                                    </th>
                                    <th>
                                        <h3>
                                            <asp:Label ID="Label5" runat="server" Text='Tên Giáo Viên'></asp:Label></h3>
                                    </th>
                                    <th>
                                        <h3>
                                            <asp:Label ID="Label4" runat="server" Text='Chi tiết'></asp:Label></h3>
                                    </th>
                                </tr>
                            </thead>
                            <tbody>
                                <!--vị trí content list-->

                                       <% for (int i = 0; i < _dttTeacher.Rows.Count; i++)
                                          {
                                %>
                                <tr>
                                    <td style="width:90px;text-align: center;">
                                        <img src="../images/avatar/teacher_parents/<%= _dttTeacher.Rows[i]["Avatar"].ToString() != "" ? _dttTeacher.Rows[i]["Avatar"].ToString() : ConstantClass._memberDefaultAvatar%>" alt="" class="img60x80"/>
                                    </td>
                                    <td>
                                        <%= _dttTeacher.Rows[i]["FullName"].ToString()%>
                                    </td>
                                    <td style="width: 50px; text-align: center;">
                                        <form method="get" action="TeacherEdit.aspx?hidClassID=<%=_classID%>&hidClassName=<%=_className%>">
                                            <input type="hidden" id="hidden4" name="hidNamePage" value="ClassDetails.aspx" />
                                            <input type="hidden" id="hidden6" name="hidTeacherID" value="<%= _dttTeacher.Rows[i]["MemberID"].ToString() %>" />
                                            <input type="hidden" id="hidden11" name="hidClassID" value="<%=_classID%>" />
                                            <input type="hidden" id="hidden12" name="hidClassName" value="<%=_className%>" />
                                            <button type="submit" title="Xem chi tiết - chỉnh sửa">
                                                <img alt="" src="layout/table/images/grid_edit.png" />
                                            </button>
                                        </form>
                                    </td>

                                </tr>
                                <% }%>
                                    
                            </tbody>
                        </table>
                    </td>
                </tr>
            </table>
		</div>

        <%}
        else
        { %>

        <br />
        <br />
        <br />
        <h4 style="color: Blue;">Hiện chưa có giáo viên nào trong lớp</h4>
        <%} %>
	</div>
	<!-- End left column window -->
				
	<!-- Begin right column window -->
	<div class="column_right" style="width:53%;">

		<div class="header">
			<span>Danh Sách Học Sinh Lớp <%= _className%></span>
            <div class="switch first">
                <form action="ClassKidDisable.aspx" method="get">
                  <input type="hidden" id="Hidden3" name="hidClassID" value="<%= _classID %>" />
                  <input type="hidden" id="Hidden4" name="hidClassName" value="<%= _className %>" />
                  <input type="submit" value="Học sinh ra trường"/>
                </form>
		    </div>

            <div class="switch last">
                <form action="ClassKidAdd.aspx" method="get">
                  <input type="hidden" id="Hidden1" name="hidClassID" value="<%= _classID %>" />
                  <input type="hidden" id="Hidden2" name="hidClassName" value="<%= _className %>" />
                  <input type="submit" value="Thêm học sinh vào lớp"/>
                </form>
            </div>
		</div>

        <%
        /* Check class has kid or not */
        if (_dttKid.Rows.Count > 0)
        {%>
		<br class="clear"/>
		<div class="content">
			<table width="100%">
                <tr>
                    <td>
                        <div id="tablewrapper">
                            <div id="tableheader">
                                <div class="search" >
                                    <select id="columns" onchange="sorter.search('query')" >
                                    </select>
                                    <input type="text" id="query" onkeyup="sorter.search('query')" />
                                </div>
                                <div class="details">
                                    <div style="margin: 0 100px 10px 0; float: left">
                                        <!--Vị trí đặt loại item-->
                                    </div>
                                    <div>
                                        <asp:Label ID="Label020" runat="server" Text='Kết quả' />
                                        <span id="startrecord"></span>-<span id="endrecord"></span>
                                        <asp:Label ID="Label021" runat="server" Text='của' />
                                        <span id="totalrecords"></span>
                                    </div>
                                    <div>
                                        <a href="javascript:sorter.reset()">
                                            <asp:Label ID="Label023" runat="server" Text='Thiết lập lại' /></a></div>
                                </div>
                            </div>
                            <table cellpadding="0" cellspacing="0" border="0" id="table" class="tinytable">
                                <thead>
                                    <tr>
                                        <!--vị trí header list-->
                                        <th class="nosort" >
                                            <h3>
                                                <asp:Label ID="Label2" runat="server" Text='Hình Ảnh'></asp:Label>
                                            </h3>
                                         </th>
                                        <th>
                                            <h3>
                                                <asp:Label ID="Labe0l5" runat="server" Text='Tên Học Sinh'></asp:Label>
                                            </h3>
                                        </th>
                                        <th class="nosort">
                                            <h3>
                                                <asp:Label ID="Label3" runat="server" Text='Chi tiết'></asp:Label>
                                            </h3>
                                        </th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <!--vị trí content list-->

                                <%  for (int i = 0; i < _dttKid.Rows.Count; i++)
                                    {
                                %>
                                    <tr>
                                        <td style="width:90px;text-align: center;">
                                            <img src="../images/avatar/kid/<%= _dttKid.Rows[i]["KidAvatar"].ToString() != "" ?  _dttKid.Rows[i]["KidAvatar"].ToString() : ConstantClass._kidDefaultAvatar%>" alt="" class="img60x80"/>
                                        </td>
                                        <td>
                                            <%= _dttKid.Rows[i]["FullName"].ToString()%>
                                        </td>
                                       <td style="width:50px; text-align:center;">
                                            <form method="get" action="KidEdit.aspx">
                                                <input type="hidden" id="Hidden5" name="hidKidID" value="<%= _dttKid.Rows[i]["KidID"].ToString() %>" />
                                                <input type="hidden" id="hidden7" name="hidNamePage" value="ClassDetails.aspx" />
                                                <input type="hidden" id="hidden9" name="hidClassID" value="<%=_classID%>" />
                                                <input type="hidden" id="hidden10" name="hidClassName" value="<%=_className%>" />
                                                <button type="submit" title="Xem chi tiết - chỉnh sửa"><img alt="" src="layout/table/images/grid_edit.png" /></button>
                                            </form>
                                       </td>
                                    </tr>
                                    <% }%>
                                        
                                </tbody>
                            </table>
                            <div id="tablefooter">
                                <div id="tablenav">
                                    <div>
                                        <img src="layout/table/images/first.gif" alt=""/>
                                        <img src="layout/table/images/first.gif" width="16" height="16" alt="First Page"
                                            onclick="sorter.move(-1,true)" />
                                        <img src="layout/table/images/previous.gif" width="16" height="16" alt="First Page"
                                            onclick="sorter.move(-1)" />
                                        <img src="layout/table/images/next.gif" width="16" height="16" alt="First Page" onclick="sorter.move(1)" />
                                        <img src="layout/table/images/last.gif" width="16" height="16" alt="Last Page" onclick="sorter.move(1,true)" />
                                    </div>
                                    <div>
                                        <select id="pagedropdown">
                                        </select>
                                    </div>
                                    <div>
                                        <a href="javascript:sorter.showall()">
                                            <asp:Label ID="Label025" runat="server" Text='Xem tất cả' /></a>
                                    </div>
                                </div>
                                <div id="tablelocation">
                                    <div>
                                        <select onchange="sorter.size(this.value)">
                                            <option value="5">5</option>
                                            <option value="10" selected="selected">10</option>
                                            <option value="20">20</option>
                                            <option value="50">50</option>
                                            <option value="100">100</option>
                                        </select>
                                        <span>
                                            <asp:Label ID="Label024" runat="server" Text='Kết quả mỗi trang' /></span>
                                    </div>
                                    <div class="page">
                                        <asp:Label ID="Label055" runat="server" Text='Trang' />
                                        <span id="currentpage"></span>
                                        <asp:Label ID="Label026" runat="server" Text='của' />
                                        <span id="totalpages"></span>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <script type="text/javascript" src="layout/table/1.js"></script> <!--vị trí có tham số không sort trên grid đếm từ phải qua trái-->
                        <script type="text/javascript">
                            var sorter = new TINY.table.sorter('sorter', 'table', {
                                headclass: 'head',
                                ascclass: 'asc',
                                descclass: 'desc',
                                evenclass: 'evenrow',
                                oddclass: 'oddrow',
                                evenselclass: 'evenselected',
                                oddselclass: 'oddselected',
                                paginate: true,
                                size: 10,
                                colddid: 'columns',
                                currentid: 'currentpage',
                                totalid: 'totalpages',
                                startingrecid: 'startrecord',
                                endingrecid: 'endrecord',
                                totalrecid: 'totalrecords',
                                hoverid: 'selectedrow',
                                pageddid: 'pagedropdown',
                                navid: 'tablenav',
                                sortcolumn: 1,
                                sortdir: 1,
                                /* sum:[8],
                                avg:[6,7,8,9],
                                columns:[{index:7, format:'%', decimals:1},{index:8, format:'$', decimals:0}], */
                                init: true
                            });
                        </script>
                    </td>
                </tr>
            </table>
		</div>
        <%}
            else
            { %>
            <br />
            <br />
            <br />
             <h4 style="color: Blue;">Hiện chưa có học sinh nào trong lớp</h4>
        <%} %>

	</div>
	<!-- End right column window -->


</div>
<!-- End two column window -->

</asp:Content>
